# Contributor: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
maintainer="team/kde <bribbers@disroot.org>"
pkgname=krfb
pkgver=24.08.2
pkgrel=0
arch="all !armhf"
url="https://kde.org/applications/internet/org.kde.krfb"
pkgdesc="Desktop sharing"
license="GPL-3.0-or-later AND GFDL-1.2-only"
makedepends="
	extra-cmake-modules
	kcompletion-dev
	kconfig-dev
	kcoreaddons-dev
	kcrash-dev
	kdbusaddons-dev
	kdnssd-dev
	kdoctools-dev
	ki18n-dev
	knotifications-dev
	kpipewire-dev
	kstatusnotifieritem-dev
	kwallet-dev
	kwayland-dev
	kwidgetsaddons-dev
	kxmlgui-dev
	libvncserver-dev
	pipewire-dev
	plasma-wayland-protocols
	qt6-qtbase-dev
	samurai
	xcb-util-dev
	xcb-util-image-dev
	"
subpackages="$pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/network/krfb.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/krfb-$pkgver.tar.xz"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
67dda22d4afa332eb5759c799458368705f3cd340e773fda8669c0071f70348cb06473c8c77bbf83e89cbba4fa17fe5848804210a67a12e330c77bf3e99fccba  krfb-24.08.2.tar.xz
"
